﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using RH.Common.Extensions;

namespace RH.Web.ViewModels
{
    public class ModalViewModel
    {
        private String _saveButton;
        private String _closeButton;
        public ModalViewModel(String controlID, String caption, String saveAction)
        {
            this.ControlID = controlID;
            this.Caption = caption;
            this.SaveAction = saveAction;
        }
        public String ControlID { get; set; }
        public String Caption { get; set; }
        /// <summary>
        /// Javascript Action Method for the Save Button
        /// </summary>
        public String SaveAction { get; set; }
        public bool IsLarge { get; set; }
        /// <summary>
        /// Full path to the body View
        /// </summary>
        public String Body { get; set; }
        public object BodyModel { get; set; }

        public String BodyHtml { get; set; }
        /// <summary>
        /// The Save Button Caption
        /// </summary>
        public String SaveButton { 
            get { return _saveButton.IsNullOrEmpty() ? "Save" : _saveButton; }
            set { _saveButton = value; } 
        }
        /// <summary>
        /// The Close Button Caption
        /// </summary>
        public String CloseButton { 
            get { return _closeButton.IsNullOrEmpty() ? "Close" : _closeButton; }
            set { _closeButton = value; } 
        }
    }
}